package com.danciyixue.boot.dcyx.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 历史单词学习记录表单对象
 *
 * @author youlaitech
 * @since 2025-06-15 16:20
 */
@Getter
@Setter
@Schema(description = "历史单词学习记录表单对象")
public class UserStudyWordHistoryForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "历史学习ID")
    private Long id;

    @Schema(description = "学生ID")
    @NotNull(message = "学生ID不能为空")
    private Long userId;

    @Schema(description = "系列ID")
    private Long seriesId;

    @Schema(description = "教材ID")
    private Long programId;

    @Schema(description = "单词ID")
    @NotNull(message = "单词ID不能为空")
    private Long wordId;

    @Schema(description = "所属单元ID")
    private Long unitId;

    @Schema(description = "单元名")
    @Size(max=128, message="单元名长度不能超过128个字符")
    private String unitName;

    @Schema(description = "学习ID")
    private Long studyId;

    @Schema(description = "来源")
    @Size(max=64, message="来源长度不能超过64个字符")
    private String source;

    @Schema(description = "拼写")
    @Size(max=128, message="拼写长度不能超过128个字符")
    private String spelling;

    @Schema(description = "音节")
    @Size(max=64, message="音节长度不能超过64个字符")
    private String syllable;

    @Schema(description = "中文释义")
    @Size(max=65535, message="中文释义长度不能超过65535个字符")
    private String meaningZhCn;

    @Schema(description = "学习进度百分比")
    @NotNull(message = "学习进度百分比不能为空")
    private Integer studyPercent;

    @Schema(description = "词汇等级")
    @Size(max=64, message="词汇等级长度不能超过64个字符")
    private String wclass;

    @Schema(description = "学习次数")
    @NotNull(message = "学习次数不能为空")
    private Integer studyTimes;

    @Schema(description = "错误次数")
    @NotNull(message = "错误次数不能为空")
    private Integer studyWrongTimes;

    @Schema(description = "是否学习过")
    @NotNull(message = "是否学习过不能为空")
    private Integer isStudy;

    @Schema(description = "下次学习时间")
    @NotNull(message = "下次学习时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime nextTime;


}
